#include"Vertex.h"

Vertex::Vertex(int length, int height,int width) {
	h = height;
	w = width;
	l = length;
}

int Vertex::toIndex(int length,int height,int width)
{
	return l*height*width + h*width +w;
}

Vertex Vertex::operator-(Vertex v) {
	return Vertex(l - v.l,h - v.h, w - v.w);
}

bool Vertex::operator==(Vertex v) {
	return (v.l == l) && (v.h == h) && (v.w == w);
}

int Vertex::Manhattan(Vertex v) {
	return abs(h - v.h) + abs(w - v.w) + abs(l - v.l);
}

/*Vertex Vertex::toVertex(int i,Map map)
{
	int l, h, w;
	l = i%
	return Vertex();
}*/
